	.file	"ptr.c"
	.text
.globl reverse
	.type	reverse, @function
reverse:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$40, %esp
	# int* left = str
	movl	8(%ebp), %eax
	# left
	movl	%eax, -16(%ebp) 
	/* int* right = strlen(str) */
	movl	8(%ebp), %eax
	movl	%eax, (%esp)
	call	strlen
	/* int* right = strlen(str) - 1 */
	subl	$1, %eax
	/* int* right = strlen(str) - 1 + str */
	addl	8(%ebp), %eax
	
	movl	%eax, -20(%ebp) # right
	
	jmp	.L2
.L3:
	movl	-16(%ebp), %eax
	movzbl	(%eax), %eax
	movb	%al, -9(%ebp)
	movl	-20(%ebp), %eax
	movzbl	(%eax), %edx
	movl	-16(%ebp), %eax
	movb	%dl, (%eax)
	movl	-20(%ebp), %eax
 	movzbl	-9(%ebp), %edx	
 	movb	%dl, (%eax)
	addl	$1, -16(%ebp)
	subl	$1, -20(%ebp)
.L2:
	movl	-16(%ebp), %eax
	cmpl	-20(%ebp), %eax
	jb	.L3
	leave
	ret
	.size	reverse, .-reverse
.globl main
	.type	main, @function
main:
	pushl	%ebp
	movl	%esp, %ebp
	andl	$-16, %esp
	subl	$32, %esp
	movl	$1701012065, 25(%esp)
	movw	$26212, 29(%esp)
	movb	$0, 31(%esp)
	leal	25(%esp), %eax
	movl	%eax, (%esp)
	call	reverse
	movl	$0, %eax
	leave
	ret
	.size	main, .-main
	.ident	"GCC: (Ubuntu 4.4.1-4ubuntu8) 4.4.1"
	.section	.note.GNU-stack,"",@progbits
